﻿using UnityEngine;
using System.Collections;

public class GameSystem : MonoBehaviour {

	public static GameObject mastermind;
	public static GameObject plateformer;

	public static GameObject startPoint;

	//PLATEFORMER
	public static float jumpForce = 150;
	public static float plateformerMovingSpeed = 5;

	//MASTERMIND
	public static float switchTimeInSeconds = 0.6f;
	public static float visionAngle = 60;

	//SCORE
	public static int scoreIgor = 0;//plateformer
	public static int scoreFerdinor = 0;//mastermind

	public void Start()
	{
		mastermind = GameObject.Find ("Ferdinor");
		plateformer = GameObject.Find ("Igor");
		startPoint = GameObject.Find ("StartPoint");
	}

	public void Update()
	{
		scoreFerdinor = mastermind.transform.FindChild ("SpinningAnchor").GetComponent<SpinningAnchor> ().m_anchorChildren.Count;
		scoreIgor = plateformer.transform.FindChild ("SpinningAnchor").GetComponent<SpinningAnchor> ().m_anchorChildren.Count;
	}



	public static IEnumerator Repop()
	{
		plateformer.SetActive (false);
		yield return new WaitForSeconds (2f);
		plateformer.SetActive (true);
	}
}
